//
//  MineDengViewController.m
//  A Learning Walk
//
//  Created by dllo on 16/6/18.
//  Copyright © 2016年 战斗民族. All rights reserved.
//

#import "MineDengViewController.h"

@interface MineDengViewController ()

@property(nonatomic, strong)UIVisualEffectView *effect;//磨玻璃

@end

@implementation MineDengViewController

-(void)dealloc{
    [_imageBig release];
    [_imageTou release];
    [_viewA release];
    [_viewB release];
    [_labelW release];
    [_viewQ release];
    [_viewW release];
    [_viewR release];
    [_buttonF release];
    [_effect release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.imageBig = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"112"]];
    self.imageBig.frame = self.view.frame;
    self.imageBig.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.imageBig];
//磨砂玻璃效果
    UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
    self.effect = [[UIVisualEffectView alloc] initWithEffect:blur];
    self.effect.frame = CGRectMake(0, 0, self.imageBig.frame.size.width, self.imageBig.frame.size.height);
    self.effect.alpha = 1;
    [self.imageBig addSubview:self.effect];
    self.imageBig.userInteractionEnabled = YES;
    
    [self creatKong];
    // Do any additional setup after loading the view.
}
-(void)creatKong{

    self.buttonF = [FengButton buttonWithType:UIButtonTypeCustom frame:CGRectMake(10, 30, 30, 30) title:nil image:[UIImage imageNamed:@"106"] color:[UIColor clearColor] handler:^(UIButton *sender) {
        
       [self dismissViewControllerAnimated:YES completion:^{
           
       }];
    }];
    [self.imageBig addSubview:self.buttonF];
    
    self.imageTou = [[UIImageView alloc] init];
    self.imageTou.backgroundColor = [UIColor whiteColor];
    self.imageTou.frame = CGRectMake(self.imageBig.frame.size.width/3, self.imageBig.frame.size.height/8, self.imageBig.frame.size.width/3, self.imageBig.frame.size.width/3);
    self.imageTou.layer.masksToBounds = YES;
    self.imageTou.layer.cornerRadius = self.imageBig.frame.size.width/6;
    self.imageTou.alpha = 0.6;
    [self.imageBig addSubview:self.imageTou];
//中间图片
    UIImageView *imageX = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"116"]];
    imageX.frame = CGRectMake(20, 20, self.imageTou.frame.size.width-40, self.imageTou.frame.size.width-40);
    imageX.backgroundColor = [UIColor clearColor];
    imageX.layer.masksToBounds = YES;
    imageX.layer.cornerRadius = (self.imageTou.frame.size.width-40)/2;
    [self.imageTou addSubview:imageX];
    
    self.viewA = [[UIView alloc] initWithFrame:CGRectMake(40, self.imageTou.frame.size.height+self.imageTou.frame.origin.y+40, self.imageBig.frame.size.width/4, 1)];
    self.viewA.backgroundColor = [UIColor whiteColor];
    [self.imageBig addSubview:self.viewA];
//中间文字
    self.viewB = [[UIView alloc] initWithFrame:CGRectMake(self.imageBig.frame.size.width-40-self.imageBig.frame.size.width/4, self.imageTou.frame.size.height+self.imageTou.frame.origin.y+40, self.imageBig.frame.size.width/4, 1)];
    self.viewB.backgroundColor = [UIColor whiteColor];
    [self.imageBig addSubview:self.viewB];
    
    self.labelW = [FengLabel LabelwithFrame:CGRectMake(self.imageBig.frame.size.width/4+60, self.imageTou.frame.size.height+self.imageTou.frame.origin.y+30, self.imageBig.frame.size.width/5,20) Color:[UIColor clearColor] font:17];
    self.labelW.text = @"边走边听";
    self.labelW.textColor = [UIColor whiteColor];
    self.labelW.textAlignment = NSTextAlignmentCenter;
    [self.imageBig addSubview:self.labelW];
//QQ
    self.viewQ = [FengView creatViewFrame:CGRectMake(40, self.labelW.frame.size.height+self.labelW.frame.origin.y+50, self.imageBig.frame.size.width-80, self.imageBig.frame.size.height/12) withColor:[UIColor colorWithRed:37/255.0 green:152/255.0 blue:205/255.0 alpha:1] withString:@"119" withLabel:@"使用QQ登录" withColorL:[UIColor whiteColor]];
    [self.imageBig addSubview:self.viewQ];
    self.viewQ.layer.masksToBounds = YES;
    self.viewQ.layer.cornerRadius = 5;
//微博
    self.viewW = [FengView creatViewFrame:CGRectMake(40, self.viewQ.frame.size.height+self.viewQ.frame.origin.y+50, self.imageBig.frame.size.width-80, self.imageBig.frame.size.height/12) withColor:[UIColor colorWithRed:246/255.0 green:82/255.0 blue:82/255.0 alpha:1] withString:@"118" withLabel:@"使用微博登录" withColorL:[UIColor whiteColor]];
    [self.imageBig addSubview:self.viewW];
    self.viewW.layer.masksToBounds = YES;
    self.viewW.layer.cornerRadius = 5;
//微信
    self.viewR = [FengView creatViewFrame:CGRectMake(40, self.viewW.frame.size.height+self.viewW.frame.origin.y+50, self.imageBig.frame.size.width-80, self.imageBig.frame.size.height/12) withColor:[UIColor colorWithRed:17/256.0 green:192/256.0 blue:91/256.0 alpha:1] withString:@"117" withLabel:@"使用微信登录" withColorL:[UIColor whiteColor]];
    [self.imageBig addSubview:self.viewR];
    self.viewR.layer.masksToBounds = YES;
    self.viewR.layer.cornerRadius = 5;
    
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
